Technical Q&As
QD3D 47 - View Hints (8-Apr-96)
Q What are view hints in the QuickDraw 3D MetaFile format (3DMF)?
A The concept of view hints was included early on in the development of
QuickDraw 3D. It became apparent that the settings for determining how a scene
should be rendered are not always transportable from one application to another
(for example, settings such as the camera location, lighting, camera type,
etc.).
The idea of a view hint is that it sets up a series of hints that tell the
reading application how the author of a MetaFile intended the geometries within
the MetaFile to be rendered. The fact that these are hints implies that the
reading application can ignore them.
Rather than writing out the lighting information to the MetaFile as absolute
objects, Apple recommends creating a view in the normal manner, adding
lighting, camera, renderer and other information in the normal manner, and then
extracting the view hints from the view with Q3ViewHints_New( theView ). You
pass in a view object, and this function returns a view hints object that
includes the view configuration for the view you pass in.
See Also:
- View hints have a bunch of handy access routines for getting and setting
renderers light groups and the like. See the File Objects chapter of 3D
Graphics Programming with QuickDraw 3D.
- The Tumbler and Podium sample code, that comes with the QuickDraw 3D SDK,
illustrates how to use view hints read from a metafile to configure a view.
Look in the file Tumbler_document.c for details.
Technical Q&As
Previous Question | Contents | Next Question